#pragma once

class Input : public Singleton<Input>
{
public:
	Input();
	~Input();

	void update(float dt);

	void registerInputDevice(InputDevice* device);
	void registerAction(int actionId, const std::string& skey);

	bool isActionDown(int actionId) const;
	bool didActionJustGoDown(int actionId) const;
	bool didActionJustGoUp(int actionId) const;
	bool isKeyDown(int actionId) const;
	bool didKeyJustGoDown(int actionId) const;
	bool didKeyJustGoUp(int actionId) const;
	void getMove(MoveParam& param) const;
private:
	bool isActionExist(int actionId) const;
	int getKeyFromActionId(int actionId) const;

private:
	std::vector<InputDevice*> inputDevices;
};